//
//  ViewController.m
//  TLYLSF
//
//  Created by MC on 2017/6/6.
//  Copyright © 2017年 MC. All rights reserved.
//
#import "ViewController.h"
#import "MCPullMenuPresentationController.h"
#import "Tool.h"
#import "MCPullMenuViewController.h"
@interface ViewController ()<MCPullMenuDelegate>

@property (weak, nonatomic) IBOutlet UITextField *textfeild;

@property (weak, nonatomic) IBOutlet UIButton *btn_sure;

- (IBAction)action_sure:(id)sender;

@property (weak, nonatomic) IBOutlet UITextView *textView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _textView.text=@"你还没有选择彩种";
    self.title=NSStringFromClass([self class]);
    
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    if (![_textfeild isExclusiveTouch]) {
        [_textfeild resignFirstResponder];
    }

}
-(void)selectLotteryKindWithTag:(id)data{
    _textView.text=data;

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)action_sure:(id)sender {
    
    /*
     *  转场动画
     */
    MCPullMenuViewController *VC = [[MCPullMenuViewController alloc]init];
    VC.delegate=self;
    VC.lotteryId=_textfeild.text;
    MCPullMenuPresentationController *PC NS_VALID_UNTIL_END_OF_SCOPE;
    PC = [[MCPullMenuPresentationController alloc] initWithPresentedViewController:VC presentingViewController:self];
    VC.transitioningDelegate = PC;
    [self presentViewController:VC animated:YES completion:NULL];
    
    
}
@end


























